class Base:

	def __init__(self):
		pass
	
	def __getattr__(self, attr):
		return getattr(self.w, attr)

	def encode(self, msg):
		
		try:
			text = unicode(msg, "ISO8859-1").encode("utf8")
		except:
			text = msg
		
		return text
	
